package gongju;

import java.util.Objects;

public class ComboItem {
    private Integer id;
    private String name;

    public ComboItem(Integer id, String name) {
        this.id = id;
        this.name = name;
    }

    public int getId() {
        return id;
    }
    public void setId(int id) {
        this.id = id;
    }
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
    public String toString() {
        return this.name;
    }

    @Override
    public boolean equals(Object o) {
        if(this==o)
            return true;
        if(o==null|| getClass()!=o.getClass())
            return false;
        ComboItem other = (ComboItem)o;
        return Objects.equals(id, other.id);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id);
    }
}